package com.atguigu.yygh.order.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author ybl
 * @version 1.9
 * @date 2021/5/31 15:30
 */
@Component
public class ConstantPropertiesUtils implements InitializingBean {

  @Value("${weixin.appid}")
  private String appid;

  @Value("${weixin.partner}")
  private String partner;

  @Value("${weixin.partnerkey}")
  private String partnerkey;

  @Value("${weixin.cert}")
  private String cert;

  public static String CERT;
  public static String APPID;
  public static String PARTNER;
  public static String PARTNERKEY;


  @Override
  public void afterPropertiesSet() throws Exception {
    APPID = appid;
    PARTNER = partner;
    PARTNERKEY = partnerkey;
    CERT = cert;
  }
}
